Fix MSVC compiler warnings (issue #127)#144
Open
killerdevildog wants to merge 1 commit into
Open
Conversation
killerdevildog
force-pushed
the
fix/msvc-warnings-127
branch
from
February 22, 2026 03:09
b25c69c to
695778d
Compare
xissburg
reviewed
Feb 22, 2026
xissburg
reviewed
Feb 22, 2026
xissburg
reviewed
Feb 22, 2026
Suppress MSVC warnings via /wd flags in CMakeLists.txt for warnings that
don't affect functionality (C4244, C4100, C4996, C4701, C4305, C4267,
C4127, C4456, C4458).
Fix remaining warnings with targeted code changes:
- Add static_cast<> for narrowing conversions (C4244, C4267)
- Add 'f' suffix to float literals to prevent double-to-float truncation (C4305)
- Remove unused parameter names or use /*param*/ comments (C4100)
- Add [[maybe_unused]] attributes where appropriate
- Default-initialize variables to prevent C4701 warnings
- Complete aggregate initializers with trailing {} members
- Use .s member access for mass_inv to scalar assignments
- Replace floating-point scientific notation (1e3, 1e6, 1e9) with
integer literals in time calculations
- Add std::move() for shared_ptr copy prevention
- Change loop variables to appropriate types (size_t vs unsigned)
killerdevildog
force-pushed
the
fix/msvc-warnings-127
branch
from
February 22, 2026 22:25
0416b8f to
43eec17
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Warning types fixed: